<?php
/**
 * Description of layout - add header and bottom to page
 * @author irh
 */
class Controller_Layout extends Controller_Template {

    protected $header = 'header';
    protected $bottom = 'bottom';
    protected $template = 'template';

    
    public function before() {
        $this->template = new View($this->template);

        $this->template->header = new View($this->header);
        $this->template->bottom = new View($this->bottom);
        
        $Category = new Model_Categories();
        $this->template->header->categories = $Category->getMainCategories();
    }
}